# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=librem-ec
pkgver=0.9.1
pkgrel=1
pkgdesc="Librem laptop EC kernel module, with AKMS"
url="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms"
arch="noarch"
license="GPL-2.0-only"
depends="akms"
source="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms/-/archive/v$pkgver/librem-ec-acpi-dkms-v$pkgver.tar.gz
	AKMBUILD"
options="!check"  # no tests
builddir="$srcdir/librem-ec-acpi-dkms-v$pkgver"

package() {
	install -Dm644 "$srcdir/AKMBUILD" "$pkgdir/usr/src/librem-ec/AKMBUILD"
	install -Dm644 "$builddir"/Makefile "$pkgdir/usr/src/librem-ec/Makefile"
	install -Dm644 "$builddir"/*.c "$pkgdir/usr/src/librem-ec/"

	install -Dm644 "$builddir"/LICENSE \
		"$pkgdir/usr/share/licenses/librem-ec/LICENSE"
}

sha512sums="
93ee26917eddbef9aa9c0eb83007452ebf57c279f41c3061ee52756bb1f748c72935067b19c3417ed7b8a9795990b0f060241c0b7f2348d7f8ec01e9f88dcd3c  librem-ec-acpi-dkms-v0.9.1.tar.gz
ad3a7b3493e72b850092d540e57d541ba1fdf5f72f101fabc22e6790515ddfb95cdb3e7efa81fcdeffb2c0f0ecf412d28f509681ebd260aeeab22ee2b99cf32f  AKMBUILD
"
